﻿<UserControl x:Class="myCollections.UserControls.UcAddMedia"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Width="Auto" Background="Transparent" Height="Auto">

    <Grid Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="35"/>
            <RowDefinition Height="35"/>
            <RowDefinition Height="35"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="190"/>
            <ColumnDefinition Width="190"/>
            <ColumnDefinition Width="120*"/>
        </Grid.ColumnDefinitions>

        <TextBlock Visibility="Visible" Height="28" Grid.Column="0" Grid.Row="0" 
               Text="{DynamicResource lblMedia}" Foreground="{DynamicResource TextColor}" Margin="5,5" HorizontalAlignment="Left" VerticalAlignment="Center"/>

        <ComboBox Name="cboMediaName" Grid.Column="1" Grid.Row="0" Height="24" VerticalAlignment="Center" Margin="5,5,5,5"
                  IsEditable="True" ItemsSource="{Binding Path=.}" SelectedValue="{Binding Path=MediaName}"
                  SelectionChanged="cboMediaName_SelectionChanged"/>

        <TextBlock Name="lblErrorMediaName" Foreground="Red" Visibility="Hidden" Grid.Column="2" Grid.Row="0" 
                   TextWrapping="Wrap"  VerticalAlignment="Center"/>

        <ComboBox Name="cboItemType" Grid.Column="1" Grid.Row="1" Height="24" VerticalAlignment="Center"
                  Margin="5,5,5,5" IsSynchronizedWithCurrentItem="True" ItemsSource="{Binding Path=.}"/>

        <TextBlock Name="lblErrorItemType" Foreground="Red" Visibility="Hidden" 
                   Grid.Column="2" Grid.Row="1" TextWrapping="Wrap"  VerticalAlignment="Center"/>

        <TextBlock Name="lblItemType" Text="{DynamicResource lblType}" Grid.Column="0" Grid.Row="1" Foreground="{DynamicResource TextColor}" Margin="5,5"
               HorizontalAlignment="Left" VerticalAlignment="Center"/>

        <TextBlock Name="lblMediaType" Visibility="Visible" Height="28" Grid.Column="0" Grid.Row="2" Text="{DynamicResource lblMediaType}"
               Foreground="{DynamicResource TextColor}" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center"/>

        <ComboBox Name="cboMediaType" Grid.Column="1" Grid.Row="2" Height="24" VerticalAlignment="Center" Margin="5" Visibility="Visible"
                  IsSynchronizedWithCurrentItem="True" ItemsSource="{Binding Path=.}"/>

        <TextBlock Name="lblErrorMediaType" Foreground="Red" Visibility="Hidden" Grid.Column="2" Grid.Row="2" TextWrapping="Wrap"
                   VerticalAlignment="Center"/>

        <TextBlock Name="lblPath" Visibility="Visible" Height="28" Grid.Column="0" Grid.Row="3" Text="{DynamicResource lblPath}"
               Foreground="{DynamicResource TextColor}" Margin="5,5" HorizontalAlignment="Left" VerticalAlignment="Center"/>
            
        <TextBox Name="txtPath"  Grid.Column="1" Grid.Row="3" Height="24" VerticalAlignment="Center" Margin="5" />
        
        <StackPanel Orientation="Horizontal" Grid.Column="2" Grid.Row="3">
            <Button Name="cmdBrowse" VerticalAlignment="Top" Margin="5" Visibility="Visible"
                    Content="{DynamicResource cmdBrowse}" Click="cmdBrowse_Click" />

            <TextBlock Name="lblErrorPath" Foreground="Red" Visibility="Hidden" VerticalAlignment="Center" TextWrapping="Wrap"/>
        </StackPanel>
        
        <Border Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="3" CornerRadius="5" BorderBrush="{DynamicResource BorderColor}" 
                BorderThickness="2" Margin="2,30,5,2"/>
        
        <Grid Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="3" Margin="5,30,5,5">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="300"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="2*"/>
                <RowDefinition Height="2*"/>
                <RowDefinition Height="2*"/>
                <RowDefinition Height="2*"/>
                <RowDefinition Height="2*"/>
            </Grid.RowDefinitions>

            <TextBlock Text="{DynamicResource lblSearchPattern}"   Margin="0,5,0,5" Foreground="{DynamicResource TextColor}" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Column="0" Grid.Row="0"/>
            <ComboBox Name="cboSearchType" Height="24" Width="140" VerticalAlignment="Top" HorizontalAlignment="Left"
                  Margin="0,5,0,0" Visibility="Visible" ItemsSource="{Binding Path=.}" Grid.Column="1" Grid.Row="0" DisplayMemberPath="DisplayName"
                  IsSynchronizedWithCurrentItem="True" />

            <TextBlock Text="{DynamicResource lblSubFolder}" Foreground="{DynamicResource TextColor}" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Column="0" Grid.Row="1" Margin="0,5,0,5"/>
            <CheckBox Foreground="{DynamicResource TextColor}" Name="chkSubFolder"  Grid.Column="1" Grid.Row="1" Margin="0,5,0,5"/>

            <TextBlock Text="{DynamicResource lblFolderImage}" Foreground="{DynamicResource TextColor}" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Column="0" Grid.Row="2" Margin="0,5,0,5"/>
            <CheckBox Foreground="{DynamicResource TextColor}" Name="chkGetImage"  Grid.Column="1" Grid.Row="2" Margin="0,5,0,5"/>

            <TextBlock Text="{DynamicResource lblUseNfo}" Foreground="{DynamicResource TextColor}" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Column="0" Grid.Row="3" Margin="0,5,0,5"/>
            <CheckBox Foreground="{DynamicResource TextColor}" Name="chkParseNfo"  Grid.Column="1" Grid.Row="3" Margin="0,5,0,5"/>

            <TextBlock Text="{DynamicResource lblCleanTitle}" Foreground="{DynamicResource TextColor}" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Column="0" Grid.Row="4" Margin="0,5,0,5"/>
            <CheckBox IsChecked="True" Foreground="{DynamicResource TextColor}" Name="chkCleanTitle"  Grid.Column="1" Grid.Row="4" Margin="0,5,0,5"/>

        </Grid>

        <StackPanel Grid.Column="1"  Grid.Row="5" Grid.ColumnSpan="3" HorizontalAlignment="Right" Orientation="Horizontal">
            <Button Name="cmdNext" VerticalAlignment="Top" Margin="5" 
                Visibility="Visible" ToolTip="{DynamicResource tltNext}" Content="{DynamicResource cmdNext}" Click="cmdNext_Click"/>
            <Button Name="cmdFinish" VerticalAlignment="Top" Margin="5" 
                Visibility="Visible" ToolTip="{DynamicResource tltFinish}" Content="{DynamicResource cmdFinish}" Click="cmdFinish_Click"/>
        </StackPanel>
    </Grid>
</UserControl>
